﻿using System.IO;
using System.Linq;

namespace Seagull.Generic
{
    public class GenericHelper
    {
        public static string NormalizeFolderPath(string raw)
        {
            return raw.Last() == Path.DirectorySeparatorChar ? raw : raw + Path.DirectorySeparatorChar;
        }

        public static string CombineAndNormilizePath(params string[] parts)
        {
            return NormalizeFolderPath(Path.Combine(parts));
        }

        public static string AppendFolderName(string path, string postfix)
        {
            return path.TrimEnd(Path.DirectorySeparatorChar) + postfix +Path.DirectorySeparatorChar;
        }
    }
}
